﻿using System.Data;

namespace DbMetadata.Providers
{
    /// <summary>
    /// Represents a factory class that can create <see cref="DbMetadataProvider"/> instances.
    /// </summary>
    public interface IDbMetadataProviderFactory
    {
        /// <summary>
        /// Creates a new <see cref="DbMetadataProvider"/> 
        /// </summary>
        /// <param name="dbConnection">The <see cref="IDbConnection"/> instances used to retrieve the metadata.</param>
        /// <returns><see cref="DbMetadataProvider"/></returns>
        DbMetadataProvider CreateMetadataProvider(IDbConnection dbConnection);

        /// <summary>
        /// Returns the full type name of the target connection type. 
        /// </summary>
        /// <example>
        /// <code>
        /// return "System.Data.SqlClient.SqlConnection";
        /// </code>
        /// </example>
        string ConnectionTypeName { get; } 
    }
}